{% extends "base.html" %}

{% block content %}

<div class="row">
	<div class="span4 columns">
		<img src="/media/{{ profile.pic.profile.url }}" />
		<p>{{ user.username }}</p>
		<p></p>
	</div>
	
	<div class="span10 columns">
		{% with num_reviews=profile.review_set.count %}
		<h2>{{ num_reviews }} Review{{ num_reviews|pluralize }}</h2>
		{% endwith %}

		{% if profile %}
			<ul>
				{% for review in profile.review_set.all %}
					<li>
						{% if is_owner %}{% endif %}
						<a href="/{{ urls.DISH }}/{{ review.dish.slug }}">{{ review.dish.name }}</a> at
						<a href="/{{ urls.PLACE }}/{{ review.dish.place.slug }}">{{ review.dish.place.name }}</a>
					</li>
					"{{ review.text }}"
				{% endfor %}
			</ul>
		{% endif %}

		<p>
			<h2>Likes</h2>
			{% if dishes_liked %}
			<ul>
				{% for dish in dishes_liked %}
				<li>
					<a href="/{{ urls.DISH }}/{{ dish.slug }}">{{ dish.name }}</a> at
					<a href="/{{ urls.PLACE }}/{{ dish.place.slug }}">{{ dish.place.name }}</a>
				</li>
				{% endfor %}
			</ul>
			{% endif %}
		</p>

		<p>
			<h2>Dislikes</h2>
			{% if dishes_disliked %}
			<ul>
				{% for dish in dishes_disliked %}
				<li>
					<a href="/{{ urls.DISH }}/{{ dish.slug }}">{{ dish.name }}</a> at
					<a href="/{{ urls.PLACE }}/{{ dish.place.slug }}">{{ dish.place.name }}</a>
				</li>
				{% endfor %}
			</ul>
			{% endif %}
		</p>

		<p>
			<h2>Photos</h2>
			{% if dish_photos %}
			<ul>
				{% for photo in dish_photos %}
				<li class="inline">
					<a href="/media/{{ photo.display.url }}"><img src="/media/{{ photo.thumbnail.url }}" class="imagedropshadow" /></a>
					{% if is_owner %}
					<a href="/{{ urls.DELETE_PIC }}/{{ photo.id }}" />[X]</a>
					{% endif %}
				</li>
				{% endfor %}
			</ul>
			{% endif %}
		</p>
	</div>
</div>

<div class="row">

</div>

{% endblock %}